// 解决色带部署不显示bug，动态引入(不支持别名)
const getRampUrl = (name: string) => {
  return new URL(`../../assets/images/color-ramp/${name}.png`, import.meta.url)
    .href;
};

const getLineTypeUrl = (name: string) => {
  return new URL(`../../assets/images/line-type/${name}.png`, import.meta.url)
    .href;
};

const getStyleLibraryUrl = (name: string) => {
  return new URL(
    `../../assets/images/style-library/${name}.png`,
    import.meta.url,
  ).href;
};

const getBaseMapUrl = (name: string) => {
  return new URL(`../../assets/images/map-type/${name}.webp`, import.meta.url)
    .href;
};
export { getBaseMapUrl, getLineTypeUrl, getRampUrl, getStyleLibraryUrl };
